<?php include TMPL_PATH.'public/header.phtml';?>
<div class="subnav">
    <div class="content-menu ib-a blue line-x" style="overflow:hidden;">
    	<div style="float:left;margin-right:50px;">
        <a  href='javascript:;' class="on" ><em>作品列表</em></a>
      </div>
    	<div style="color:#000;">
    	</div>
    </div>
</div>
<div class="bk"></div>
<form action="__SELF__" method="post" name="myform"  id="myform">
<div class="pad_10">
<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
            <th width="30" align="center">ID</th>
            <th align='left'>产品名称</th>
			<th align='center' width="50">顶/踩</th>
            <th align='center' width="50">设计师</th>
            <th align='center' width="50">是否审核</th>
			<th align='center' width="150">创建时间</th>
			<th align='center' width="80">管理操作</th>
            </tr>
        </thead>
    <tbody>
    <?php 
   	if(isset($productList) && $productList):
   		foreach ($productList as $v):
   ?>
			<tr>
				<td align="center"><?php echo $v['id'];?></td>
				<td><a href="/designer/info/pid/<?php echo $v['id']?>" target="_blank"><?php echo $v['name']?></a></td>
				<td align='center'><?php echo $v['designer_up']?>/<?php echo $v['designer_down']?></td>
				<td align='center'><?php echo $v['username']?></td>
				<td align='center' id="status-<?php echo $v['id']?>">
					<?php if($v['display']):?>
					<a href="javascript:setting_status(<?php echo $v['id']?>,0);"><font color="red">√</font></a>
					<?php else:?>
					<a href="javascript:setting_status(<?php echo $v['id']?>,1);"><font color="blue">×</font></a>
					<?php endif;?>
				</td>
				<td align='center'><?php echo date('Y-m-d H:i:s',$v['time']);?></td>
				<td align='center'> 
				<a href="<?php echo U('product/designer_product_edit', 'pid='.$v['id']);?>">升级</a> | 
				<a href="javascript:confirmurl('<?php echo U('product/designer_product_delete', 'pid='.$v['id']);?>','确认要删除 『<?php echo $v['name']?>』 吗？')">删除</a>
				</td>
			</tr>
	<?php 
		endforeach;
		endif;
	?>
   </tbody>
    </table>
<div class="btn">
    
	
	<div id="pages"><?php echo $pageShow;?></div>
	</div> 
</div>
</div>
</form>
</body>
</html>
<script type="text/javascript">
function setting_status(id,display){
	$.get('<?php echo U('product/change_status_ajax02');?>',{pid:id,display:display},function(){
			if(display==0){
				$('#status-'+id).html('<a href="javascript:setting_status('+id+',1);"><font color="blue">×</font></a>');
			}else{
				$('#status-'+id).html('<a href="javascript:setting_status('+id+',0);"><font color="red">√</font></a>');
			}
		});
}
</script>
